home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / include4_6 / sybtypes.h < prev   
Encoding:
C/C++ Source or Header  |  1993-04-22  |  2.7 KB  |  97 lines

  1. /*
  2. **    @(#) sybtypes.h 77.1 11/11/91
  3. **
  4. **  COMTYPES.H
  5. **
  6. **    Header file to be included in all files which use Common-Lib routines.
  7. **    This header file contains:
  8.         a) definitions for NULL, FALSE, TRUE
  9. **        b) type definitions for the Common-Lib datatypess;
  10. */
  11.  
  12. #ifndef    __sybtypes__
  13. #define __sybtypes__
  14.  
  15. #ifndef NULL
  16. #define NULL            0
  17. #endif /* NULL */
  18.  
  19. #ifndef FALSE
  20. #define FALSE   0
  21. #endif /* FALSE */
  22.  
  23. #ifndef TRUE
  24. #define TRUE    1
  25. #endif /* TRUE */
  26.  
  27.  
  28. #define    COM_MAXCHAR    256
  29. /*
  30. ** Type definitions for Common-Lib datatypes.
  31. */
  32.  
  33. typedef unsigned char   COM_TINYINT;      /* 1 byte integer */
  34. typedef short           COM_SMALLINT;   /* 2 byte integer */
  35. typedef long            COM_INT;        /* 4 byte integer */
  36. typedef char            COM_CHAR;       /* char type */
  37. typedef unsigned char   COM_BINARY;     /* binary type */
  38. typedef unsigned char   COM_BIT;        /* bit type */
  39.  
  40. typedef struct com_datetime             /* datetime type */
  41. {
  42.         long    dtdays;             /* number of days since 1/1/1900 */
  43.         long    dttime;             /* number 300th second since mid */
  44. } COM_DATETIME;
  45.  
  46. typedef struct com_datetime4            /* 4-byte datetime type */
  47. {
  48.         unsigned short  days;       /* number of days since 1/1/1900 */
  49.         unsigned short  minutes;       /* number of minutes since midnight */
  50. } COM_DATETIME4;
  51.  
  52. typedef struct com_money                    /* money type */
  53. {
  54.         long            mnyhigh;
  55.         unsigned long   mnylow;
  56. } COM_MONEY;
  57.  
  58. typedef struct com_money4                   /* 4-byte money type */
  59. {
  60.         long            mny4;
  61. } COM_MONEY4;
  62.  
  63. typedef double          COM_FLT8;         /* float type */
  64.  
  65. typedef float           COM_REAL;         /* 4-byte float type */
  66.  
  67. typedef    unsigned char    COM_BYTE;
  68.  
  69. typedef unsigned char   COM_BOOL;      /* for boolean values */
  70.  
  71. typedef struct com_varychar        /* Pascal-type string. */
  72. {
  73.     COM_SMALLINT    len;        /* length of the character string */
  74.     COM_CHAR    str[COM_MAXCHAR];    /* string, with no NULL terminator */
  75. } COM_VARYCHAR;
  76. typedef struct com_varybin        /* Pascal-type binary array. */
  77. {
  78.     COM_SMALLINT    len;        /* length of the binary array */
  79.     COM_BYTE    array[COM_MAXCHAR];/* the array itself. */
  80. } COM_VARYBIN;
  81.  
  82. typedef struct com_daterec
  83. {
  84.         long    dateyear;       /* 1900 to the future */
  85.         long    datemonth;      /* 0 - 11 */
  86.         long    datedmonth;     /* 1 - 31 */
  87.         long    datedyear;      /* 1 - 366 */
  88.         long    datedweek;      /* 0 - 6 (Mon. - Sun.) */
  89.         long    datehour;       /* 0 - 23 */
  90.         long    dateminute;     /* 0 - 59 */
  91.         long    datesecond;     /* 0 - 59 */
  92.         long    datemsecond;    /* 0 - 997 */
  93.         long    datetzone;      /* 0 - 127 */
  94. } COM_DATEREC;
  95.  
  96. #endif /* __sybtypes__ */
  97.